package com.jpcc.vw.onlineRadio.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.RelativeLayout;

import com.jpcc.vw.onlineRadio.R;
import com.jpcc.vw.onlineRadio.activity.FavouritePaiedHistoryActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MyListFragment extends com.jpcc.vw.onlineRadio.base.BaseFragment {

    @BindView(R.id.layout_my_favourite)
    RelativeLayout layout_my_favourite;
    @BindView(R.id.layout_my_download)
    RelativeLayout layout_my_download;
    @BindView(R.id.layout_my_paied)
    RelativeLayout layout_my_paied;
    @BindView(R.id.layout_my_history)
    RelativeLayout layout_my_history;


    @Override
    public int getLayoutId() {
        return R.layout.fragment_my_list;
    }

    @Override
    public void setupView() {
        ButterKnife.bind(this, mContextView);
    }

    @Override
    public void setupData() {

    }

    @OnClick({R.id.layout_my_favourite, R.id.layout_my_download, R.id.layout_my_paied, R.id.layout_my_history})
    void doClicks(View view) {
        int id = view.getId();
        switch (id) {
            case R.id.layout_my_favourite:
                Intent intent_favourite=new Intent(getActivity(), FavouritePaiedHistoryActivity.class);
                intent_favourite.putExtra("KEY_TYPE",0);
                startActivity(intent_favourite);
                break;
            case R.id.layout_my_download:
                Intent intent_download=new Intent(getActivity(), FavouritePaiedHistoryActivity.class);
                intent_download.putExtra("KEY_TYPE",1);
                startActivity(intent_download);
                break;
            case R.id.layout_my_paied:
                Intent intent_paied=new Intent(getActivity(), FavouritePaiedHistoryActivity.class);
                intent_paied.putExtra("KEY_TYPE",2);
                startActivity(intent_paied);
                break;
            case R.id.layout_my_history:
                Intent intent_history=new Intent(getActivity(), FavouritePaiedHistoryActivity.class);
                intent_history.putExtra("KEY_TYPE",3);
                startActivity(intent_history);
                break;
        }
    }
}
